FrameMetricsAggregator
This class can be used to record and return data about per-frame durations. It returns those results in an array per metric type, with the results indicating how many samples were recorded for each duration value. The details of the durations data are described in getMetrics.
For more information on the various metrics tracked, see the documentation for the FrameMetrics API added in API 24 as well as the GPU Profiling guide.
Constructors
Link copied to clipboard
constructor()
Constructs a FrameMetricsAggregator object that will track TOTAL_DURATION metrics.
Constructs a FrameMetricsAggregator object that will track the metrics specified bty
metricTypeFlags
, which is a value derived by OR'ing together metrics constants such as TOTAL_DURATION to specify all metrics that should be tracked.Types
Link copied to clipboard
Properties
Link copied to clipboard
A flag indicating that the metrics should track the animation duration.
Link copied to clipboard
The index in the metrics array where the data for ANIMATION_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the command duration.
Link copied to clipboard
The index in the metrics array where the data for SYNC_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the delay duration.
Link copied to clipboard
The index in the metrics array where the data for DELAY_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the draw duration.
Link copied to clipboard
The index in the metrics array where the data for DRAW_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track all durations.
Link copied to clipboard
A flag indicating that the metrics should track the input duration.
Link copied to clipboard
The index in the metrics array where the data for INPUT_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the layout duration.
Link copied to clipboard
The index in the metrics array where the data for LAYOUT_MEASURE_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the swap duration.
Link copied to clipboard
The index in the metrics array where the data for COMMAND_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the sync duration.
Link copied to clipboard
The index in the metrics array where the data for SYNC_DURATION is stored.
Link copied to clipboard
A flag indicating that the metrics should track the total duration.
Link copied to clipboard
The index in the metrics array where the data for TOTAL_DURATION is stored.
Functions
Link copied to clipboard
Returns the currently-collected metrics in an array of SparseIntArray objects.
Link copied to clipboard
Stops recording metrics for
activity
and returns the collected metrics so far.Link copied to clipboard
Resets the metrics data and returns the currently-collected metrics.
Link copied to clipboard
Stops recording metrics for all Activities currently being tracked.